Programmable controller input/output communications system

ABSTRACT

The invention disclosed is useful in an I/O system of a programmable controller and provides a method and circuitry by which control and diagnostic information is exchanged between a control unit of an I/O module and a plurality of input/output points of the I/O module. A control signal is generated in the control unit in the form of sequential pulse frames such that the control information is defined by a series of pulse width modulated pulses. Each frame includes a no-pulse time period following the review of pulses to mark the end of a frame. Each I/O point receives a control signal of its own and generates a clock pulse in response to each pulse. The clock pulse initiates a sampling of the corresponding pulse and simultaneously initiates return of a diagnostic signal value to the central unit. Thus, the control signal provides for sampling of its own content and provides for a return of a diagnostic data bit for each control bit.

This is a continuation of application Ser. No. 617,179, filed June 4,1984, now U.S. Pat. No. 4,872,136.

The present invention relates in general to methods and apparatus foruse with "programmable controllers"; and in particular to an intelligentinput/output system therefor.

BACKGROUND OF THE INVENTION

Process control with a programmable controller involves the acquisitionof input signals from various process sensors and the provision ofoutput signals to controlled elements of the process. The process isthus controlled as a function of a stored program and of processconditions as reported by the sensors. Numerous and diverse processesare, of course, subject to such control, and sequential operation ofindustrial processes, conveyor systems, and chemical, petroleum, andmetallurgical processes may all, for example, be advantageouslycontrolled by programmable controllers.

Programmable controllers are of relatively recent development. A stateof the art programmable controller comprises a central processing unit(CPU) made up, broadly, of a data processor for executing the storedprogram a memory unit of sufficient size to store the program and thedata relating to the status of the inputs and outputs, and one or morepower supplies. In addition, an input/output (I/O) system provides theinterface between the central processing unit and the input devices andcontrolled elements of the process being controlled.

Input/output systems have remained relatively unchanged since the adventof programmable controllers and are the feature most in need ofimprovement. While some advances have been made in I/O systems, theimprovements have generally been along the same lines as those followedin the past. For example, U.S. Pat. No. 4,293,924 describes an I/Osystem wherein the density of the interface is increased. Anotherapproach, illustrated by U.S. Pat. No. 4,247,882, has been toconcentrate on improving the housing for the input/output system. Withthe increased complexity of the processes requiring control, and with aneed for a greater exchange of information between the process and thecentral processor, however, other improvement approaches to I/O problemshave been needed.

The conventional I/O system is composed of a number of individual I/Opoints, each one of which is devoted to either receiving the signal froman input device (e.g., a limit switch, pressure switch, etc.) or toproviding a control signal to an output device (e.g., a solenoid, motorstarter, etc.). depending on how the circuitry for the particular I/Opoint is configured. That is, an I/O point is dedicated to being eitheran input point or an output point and is not readily converted from oneuse to the other.

One problem with state of the art I/O systems (particularly when usedwith a complex process) is the high cost of installation. Typically, I/Omodules, or circuit cards, are housed in card racks or cages. Forcontrol of an extensive or complex process, a large number of I/O pointsmust be provided in each rack or cage. This necessarily entails a greatdeal of wiring expense (both for labor and for materials) since wiresfrom all of the input and output devices must be brought into the I/Orack.

Additional problems then arise from use of a large I/O rack since it isfrequently difficult to bring all of the wires into the rack to make theterminations. Although it is well-known to provide at least a portion ofan I/O system in an enclosure or rack remote from the CPU (in an attemptto get the I/O closer to the process being controlled), these problemsare still not overcome since there is a concentration of input/outputwiring into a single (albeit remote) location. Further complicationsarise in dissipating heat in a concentrated I/O system and, for thatreason, it is frequently necessary to operate an I/O system at less thanits optimum rating.

Another problem with present I/O systems is that they are difficult todiagnose and troubleshoot--whether the malfunctions occur in theprogrammable controller, per se, or in the controlled process.Experience has shown that most on-line failures associated with acontroller occur in the I/O system. The CPU portion is now highlyrefined, having benefited greatly from the advances in microprocessortechnology and data processing, for example. When an electrical failuredoes occur, however, early detection and diagnosis of the precise natureof the problem is often critical. It is naturally desirable to detect afailed part through an advanced warning rather than after some part ofthe process is out of control.

With state of the art I/O systems, early detection or failures isdifficult, and even when a failure is signaled its precise location andnature may not be apparent. In many cases it is even difficult toseparate controller I/O failures from failed elements (e.g., motors,pushbuttons, etc.) in the process. Diagnostic features, particular forthe controller I/O system, have simply been lacking. Improvements fordiagnosing and preventing I/O system failures have therefore beeneagerly sought.

The problem of diagnosing failures is at times made difficult becauseeach I/O point is ordinarily protected by a fuse. Although the fuseprotects the particular I/O module from overcurrent, frequently it addsto the problem. For example, mere transient current may blow the fuse,leaving the I/O point completely inoperative until the failed point canbe located and the fuse replaced.

Somewhat related is the problem of exchanging diagnostic and controlinformation between a controlling portion and a controlled portion of anI/O system. For example, it may occur that distributed I/O modules areused to configure an I/O system. In such case it is desirable to providesimple, reliable means and methods for exchanging such information.

Yet another drawback of conventional I/O systems is that (as wasmentioned above) each I/O point functions strictly as an input point oras an output point. The same point may not readily be converted from oneuse to the other. The user of a programmable controller is thereforerequired to select input and output functions separately, based on aninitial estimate of needs. There is a decided lack of flexibility forunforeseen future needs. Moreover, since I/O points are typicallyavailable in groups (e.g., six or eight points per circuit card), thereis frequently a large number of unused I/O points in a control system.

Accordingly, the principal object of the present invention is to providean input/output system which overcomes these shortcomings ofconventional I/O systems. More particularly, however, it is sought toprovide an I/O system wherein each I/O point may be selected to operateeither as an input point or as an output point.

In addition, it is sought to provide an input/output system wherein eachI/O point is self-protected against overcurrent and overvoltageconditions without the use of fuses or circuit breakers and wherein eachI/O point is continuously and automatically diagnosed for failure, bothwithin the I/O system and within the controlled process, and whereindetected failures are identified and automatically reported. A further,specific object of the invention is to provide an I/O system which issimple and economical to wire and use and which provides individual I/Opoints in distributed groups, or modules, for location in closeproximity to the process, or particular part of the process to becontrolled. An additional object of the invention is to provide an I/Osystem which includes means for monitoring, controlling, andtroubleshooting each I/O point independent of the conventional centralprocessor unit. Still further objects, features, and advantages of theinvention will appear from the ensuing detailed description.

SUMMARY OF THE INVENTION

The present invention is useful in an I/O module which may be one of aplurality of such modules, each designed for location in close proximityto the process being controlled and each designed for communication witha common central processing unit.

Preferably, the invention provides a method and circuitry by whichcontrol and diagnostic information is exchanged between a controllingelement of the module and a plurality of controlled elements which aregenerally referred to herein as input/output points.

As a method, the invention preferably includes the steps of: (a)generating at least one control signal which takes the form ofsequential frames, each frame having at least one control pulse whichdefines the control status of an output device adapted to be activatedand deactivated in accordance with the control status; (b) transmittingthe control signal from the controlling element to a controlled elementand therein generating a clock pulse which follows the control pulse bya pre-selected time interval; (c) generating in the controlled element adiagnostic signal whose value is indicative of the operating parameters(e.g., current, voltage, temperature) of the controlled element; and (d)applying the clock pulse on each frame of the control signal to causethe control pulse to be sampled and to cause a simultaneous transmissionof the diagnostic signal value to the controlling element.

Thus, in terms of operation, the control information (i.e., each controlpulse) initiates a clock pulse causing a sampling of the control valueand simultaneously initiating a transmission of the diagnostic value tothe controlling part of the system.

In other aspects of the invention a series of control pulses areincluded in each frame and these pulses are pulse width modulated. Thepulse width modulation is such that the value of the pulse is eitherhigh or low (to define the control information) at the sampling instant.The end of each frame is then defined by the occurrence of a no-pulsetime interval during which no pulses appear. The no-pulse time intervalinitiates a synchronization pulse which resets circuitry for the startof a new frame and generally synchronizes operation. The output deviceis activated or deactivated on each frame in accordance with thetransmitted control status.

In still further aspects of the invention, at least the first two pulsesof each frame are transmitted redundantly to aid in maintaining controlsignal integrity. If the pulses are not redundantly received, the lastvalid activation or reactivation state for the output control device isretained. A loss of communications is signaled whenever the no-pulsetime period at the end of each frame extends beyond a pre-selected timeduration. Upon such a loss in communications, latches and logiccircuitry direct the output device to a different state or (if sodesired) to hold its last previously valid state.

BRIEF DESCRIPTION OF THE DRAWINGS

While the specification concludes with claims particularly pointing outand distinctly claiming the subject matter regarded as the invention,the invention will be better understood from the following descriptiontaken in connection with the accompanying drawings in which:

FIG. 1 is a simplified block diagram of a programmable controller systemincluding an intelligent input/output (I/O) system in accordance withthe present invention;

FIG. 2 is a perspective illustration of one possible physical form foran individual I/O module and a hand-held monitor, both configured foruse in the I/O system of FIG. 1;

FIG. 3 is a block diagram illustrating in greater detail one of the I/Omodules of FIG. 1;

FIG. 4 is a simplified block diagram of a communications section and acontrol and sensing section for an I/O point of the type illustrated inFIG. 3;

FIGS. 5 and 6 are illustrations of waveforms showing the relationshipbetween certain signals relevant to the circuitry of FIG. 4;

FIGS. 7A, 7B, and 7C are schematic diagrams illustrating variousinput/output switching circuits usable with the I/O circuit of FIG.4--FIG. 7A showing a dc source circuit, FIG. 7B showing a dc sinkcircuit, and FIG. 7C showing an ac circuit;

FIG. 8 is a schematic diagram illustrating in detail a control andsensing section for the I/O point of FIG. 4;

FIG. 9 shows how FIGS. 9A, 9B, and 9C are related.

FIG. 9A, 9B, and 9C are schematic diagrams, illustrating in detail, acommunications section for the I/O point of FIG. 4; and

FIG. 10 is a truth table relating diagnostic and status data to a 4-bitcoded signal for providing combinatorial logic in a state encoder forthe communications section of FIG. 4.

DETAILED DESCRIPTION OF THE INVENTION

The programmable controller of FIG. 1 includes a central processing unit(CPU) 20, an input/output (I/O) controller 22, a plurality ofinput/output modules 24-26, and a data communications link 28 whichinterconnects each I/O module 24-26 with the I/O controller 22 Theseitems, exclusive of CPU 20, generally comprise the input/output systemof the controller. The CPU 20 is substantially of conventional designand may include one or more microprocessors for data handling andcontrol, plus memory for storage of operating programs, input/outputdata, and other computed, interim, or permanent data for use inexecuting the stored program and for implementation of control. Inaddition, other conventional elements, such as power supplies, areincluded as necessary to make the CPU 20 fully functional. The I/Ocontroller 22 provides for control of information exchanged between thevarious I/O modules 24-26 and the CPU 20.

Each I/O module 24-26, may be separately located, remote from CPU 20 andI/O controller 22, and in close proximity to the process beingcontrolled. Although only three I/O modules are illustrated in FIG. 1,it will be understood that the actual number may be considerablygreater. For example, sixteen separate I/O modules may be readilyaccommodated in the system to be described herein. Each I/O module isindependent of the other and each may be devoted to control of a processseparate from that controlled by all other I/O modules.

In FIG. 1, for example, the Nth I/O module 26 is illustrated to controla generalized process 30. The input and output signals associated withprocess 30 are conveyed by conductors 32 which run between the process30 and the I/O module 26. The process 30 may, of course, take virtuallyany form. In any case, however, it includes various sensors, switches,etc. (not specifically illustrated) for sensing the status and conditionof the process 30. The information from the process is in the form ofinput signals to I/O module 26. The process 30 also includes controlledelements (e.g., pumps, motors, etc.--also not illustrated) which receivethe output signals from the I/O module 26 and which thereby effectcontrol of the process 30. In similar fashion each of the other I/Omodules 24, 25 is interconnected to input and output devices andapparatus associated with a process.

The data communications link 28 is preferably a serial link althoughparallel transmission of signals between the CPU 20 and the I/O modules24-26 may be readily provided. In either case, I/O modules 24-26 areconnected to the communications link 28 for communication with CPU 20.The communications link 28 may comprise a twisted pair of conductors, acoaxial cable, or a fiber optics cable; all are acceptable depending onsuch considerations as cost and availability.

In FIG. 1, I/O module 24 illustrates in block diagram form the generaloverall electronic structure of each I/O module.

Thus, there is included a microcontroller 36 having an interface portfor exchanging information with CPU 20 and including an associatedmemory p(not illustrated) for implementation of a stored program ofoperation according to which the various elements of the I/O modules arecontrolled and diagnosed for incurred faults; a plurality of individualI/O points (or, "I/O circuits") 37-39, each of which may be selectablyoperated either as an input point or as an output point and each ofwhich interfaces individually through conductors directly to input oroutput elements of the controlled process; and a conductor bus 40 forinterconnecting the I/O points 37-39 to the microcontroller 36. Thenumber of I/O points 37-39 in any particular I/O module 24-26 depends onpractical considerations such as heat dissipation and the limitations ofthe microcontroller 36. As an example, however, it has been found quitepractical and convenient to provide sixteen I/O points per I/O module.

For verifying the integrity and functionality of the input and outputcomponents and for maintenance and troubleshooting, monitoring apparatus42 is provided. The monitor 42 is preferably sized to be hand held sothat it can be readily and conveniently moved from one I/O module to theother. It is adapted for connection into each I/O module by a cablewhich includes a connector for mating with another connector affixed tothe I/O module. The cable and mating connectors are schematicallyillustrated in FIG. 1 which shows the monitor 42 connected to I/O module24 through an interface port of the microcontroller 36.

When connected to an I/O module, the hand-held monitor 42 allows the I/Opoints of that module to be monitored and controlled and provides adisplay of diagnostic information pertaining to the module.Advantageously, the hand-held monitor performs these functionsindependently of the central processing unit 20 and even without the CPU20 being present. The monitor 42 is operative for example, to turnoutput points on and off and to read the state of the input points. Incase a fault has occurred, the monitor 42 can also provide an indicationof the nature and location of the fault. The hand held monitor 42 may benoted to include a data display panel 44 which displays alpha numericcharacters and a set of key switches 46 which provide for addressprogramming and for effecting operation of the I/O modules 24-26.

Referring now to FIG. 2, preferred physical forms for a hand-heldmonitor and an individual I/O module are illustrated. Thus, theillustrated I/O module 51 is substantially in the form of a terminalblock which includes a row of conductor terminals 53 for makingconnection to the conductors that connect with the input and outputdevices of of the controlled process. The terminals 53 may be in theform of screw-type connections in which the screws are tightened down ona connecting wire or terminal lug. Each I/O circuit is assigned to acorresponding terminal connection. In addition, terminals are assignedfor connecting an external power source (ac or dc) and for makingconnections to the data communication link as shown in FIG. 1. Visualindicators are provided, in the form of light emitting diodes (LEDs) 55to indicate the status of each I/O point. Additional LEDs 57 and 58provide an indication of the operational status of the module 51. Forexample, LED 57 indicates that a fault condition is present (eitherinternal or external to the module) and LED 58 indicates normaloperating conditions. A connector 59 is provided on the module 51 formating with a cable connector 60, and, through cable 61 to hand-heldmonitor 49.

The illustrated hand-held monitor 49, as described above and inconnection with FIG. 1, is able to exercise the I/O module to which itis connected. That is, the hand- held monitor allows an I/O module to beoperated and thoroughly checked out even if it is not connected to acentral processing unit as shown in FIG. 1.

The block diagram of FIG. 3 illustrates an I/O module 80 (substantiallythe same as any one of modules 24-26 of FIG. 1) in greater detail. TheI/O module 80 thus includes a group of 8 separate I/O points 81-88, eachone of which exchanges control and diagnostic information signals withmicrocontroller 90. Electrical power, either ac or dc, is supplied atterminals H and N. The power source connected to terminals H and Nprovides power both to an internal dc power supply 94 and to anyexternal output loads (e.g., controlled elements) which are controlledby the programmable controller of which module 80 is a part. Powersupply 94 is simply the dc power supply for all elements contained inthe I/O module 80 which require dc power in their operation.

Each I/O point 81-88 is connected to the microcontroller 90 by a pair ofconductors 95-102, respectively. One conductor of each pair, designatedthe D line, conveys control data to the associated I/O point; the otherline, designated the M line, conveys status and diagnostic informationfrom the I/O point to the microcontroller 90. Each I/O point 81-88 isalso connected to receive dc power (e.g., 15 volts) from power supply 94and each is connected to the power source terminals H and N. If theexternal power source connected to terminals H and N is a 115 or 230volt ac line, for example, the H and N terminals merely refer to the hotand neutral sides of the line, respectively. However, if the externalpower source is dc, the H terminal may be the positive side of thesource and the N terminal the negative side. In addition, each I/Omodule 81-88 includes an IN/OUT terminal which is of dual function. Ifthe I/O point is to be operated as an output point, the IN/OUT terminalfor that point is connected to the controlled element (or load) in theprocess which that point is assigned to control. On the other hand, ifthe I/O point is to be operated as an input, the IN/OUT line for thatpoint receives the input signal from the input device. The same IN/OUTline thus serves both functions, depending on the command from themicrocontroller 90 and the second (or reference) connection of the inputor output device. As an example, I/O point 82 is shown operating as anoutput point, turning power on or off to a load device 89. Load 89 isconnected between the IN/OUT line of I/O point 82 and the N line to thepower source. By contrast, I/O point 84 is shown operating as an inputpoint with an input switching device 91 connected between the IN/OUTline and the H line of the power source. Any one of I/O points 81-88 maybe operated in the output mode either as a dc source, as a dc sink, oras an ac source, depending somewhat on the internal circuitry of the I/Opoint. That aspect of the circuitry is discussed more fully hereinbelow.

Information provided to the microcontroller 90 from each I/O point81-88, via the M line connection, includes data reporting the status ofload current (high or low), the level of power supplied to that I/Opoint, the temperature condition of the I/O point, the status of anyinput device, and still other information, all of which will be setforth in greater detail subsequently herein.

Control of each I/O point 81-88 is ultimately determined by a centralprocessing unit as outlined in connection with FIG. 1. In FIG. 3,communication with such a CPU is through an interface port (preferably aserial port) of microcontroller 90 and through a data communicationslink 106 (28 of FIG. 1). Other I/O modules substantially similar tomodule 80 of FIG. 3 may also be connected to the data communicationslink 106. While microcontroller 90 is responsive to the commands of thecentral processing unit, it also provides localized, distributed controlof each I/O point within the I/O module 80. Microcontroller 90 is anoperations control unit and operates in accordance with a stored programand as a function of commands from the central processing unit and thesignals received on the M line from each I/O point 81-88. Although notspecifically illustrated in FIG. 3, microcontroller 90 also includesmemory for program storage and for storage of other data necessary tocarry out program execution and to achieve the intended control.

The simplified block diagram of FIG. 4 shows a preferred embodiment ofan I/O circuit exclusive of the output switching device. The I/O pointthus includes a communications section 111 and a control and sensingsection 113. The communications section 111 (to be discussed first)includes timer 117, output data filter 119, output selector 120, two-bitcounter 121, hold last state latch 123, default latch 124, state encoder125 state latch 127, and data selector 129.

The communications section 111 receives, on line D, a signal SIG fromthe operations control unit (e.g., as from microcontroller 90 of FIG. 3)and a set of state indicative (diagnostic) signals on a six conductorbus 115. The communications section 111 produces an ON/OFF commandsignal to the control and sensing section 113 and transmits a diagnosticsignal (STATE) to the microcontroller on line M. The ON/OFF commandsignal ultimately controls a switching device (preferably an insulatedgate transistor, or IGT, to be discussed subsequently) whose operationdepends on whether the I/O point is to serve as an input or as anoutput. FIGS. 5 and 6 illustrate the relationship between certainsignals involved in the operation of the communications section 111 andshould be referred to in conjunction with FIG. 4.

The control signal SIG is a coded pulse train containing on/offinformation, hold last state (HLS) information, default state (DEF)information, and timing information. It consists of a series of"frames", each of which contains either two or four pulses followed bythe omission of a pulse, i.e., a "missing pulse". The "missing pulse"serves to resynchronize operation of the communications section 111.Each of the two or four pulses has a duty cycle of either 25 percent or75 percent. The time between pulses within a frame, T, is fixed and isalso the time duration of the "missing pulse". The control signal SIG isinitially applied to a timer 117 wherein its rising edge causes thetimer 117 to reset and to initiate its timing cycle. Thus, the timer 117puts out a rising edge of the clock signal CLK approximately 0.5T aftereach rising edge of SIG. The CLK signal is used to clock two bit counter121, output data filter 119, and latches 123 and 124. Unless firstreset, the timer 117 also puts out a rising edge of the synchronizingsignal SYNC approximately 1.5T after a rising edge of SIG, and it putsout a falling edge of the LOS signal at some significantly longer timeafter a rising edge of SIG (e.g., 2.5T). Normally, rising edges of SIGoccur at intervals of T so that the timer 117 is reset before the SYNCor LOS transitions can occur. However, upon the occurrence of a "missingpulse" (synchronizing interval), a time 2T occurs between rising edgesof SIG, causing SYNC to go high for approximately 0.5T. The SYNC pulseresets the communications section 111 and thus signals that a new frameis about to start. If a period of more than 2.5T occurs between risingedges of SIG, LOS will go low, signalling to the communications section111 that a loss of signal has occurred.

The on/off information passing to the I/O point on line D is containedin the first two pulses of each frame of the control signal. A 75percent duty cycle pulse corresponds to a logical "1" (switch on) and a25 percent duty cycle corresponds to a logical "0" (switch off). As willbecome clear, the clock pulse which occurs at 0.5T after the rising edgeof a SIG pulse, effectively causes a sampling of the SIG pulse at thattime. Thus, if a 25% duty cycle (0.25T) pulse has been transmitted, alow level or "zero" is obtained at 0.5T. On the other hand, if a 75%duty cycle (0.75T) pulse has been transmitted, a high level or "one" isobtained at 0.5T. The first two pulses are also transmitted redundantly:that is. the first two pulses must agree (both 1 or both 0) in order forthe communications section 111 to respond to the ON/OFF command. Forthese purposes, the control signal SIG is provided to output data filter119 which effectively samples and compares the first two pulses of thecontrol signal. If the two pulses are different (due, for example, tonoise interference), the output data filter 119 maintains the last validON/OFF command which was received.

If a frame of the control signal contains four pulses rather than two,then the third and fourth pulses are used to update the hold last statelatch 123 and the default latch 125, respectively. The contents of theselatches 123 and 124 are only changed when third and fourth pulses arereceived. A logical one in the third pulse position sets the hold laststate signal HLS high; a logical zero in the third pulse position causesthe HLS signal to go low. The HLS signal appears at the output of theHLS latch 123 and is provided to the output selector 120 and to thestate encoder 125. Similarly, a fourth pulse sets the default signal DEFhigh or low (high=On, low=Off). The default signal DEF and itscomplement DEF appear as outputs from the default latch 124. The defaultsignal DEF is supplied to the state encoder 125 and its complement DEFis supplied to the output selector 120. In the event of a loss ofcommunications from the microcontroller (i.e., a loss of the controlsignal causing LOS to go low), the HLS signal commands the outputselector 120 to either hold the previous on/off state or to assume thedefault state. If HLS is a logical one, then the previous state will bemaintained; if HLS is equal to zero, then the default state will beassumed as soon as LOS goes low. The advantage of this operation isapparent: in the event of a loss of communications between the I/O pointand the controlling device (i.e.. the microcontroller of FIGS. 1 and 3)the on/off condition is forced into a pre-selected, preferred state.

The two-bit counter 121 counts CLK pulses to provide an output count, S0and S1, which takes binary values between zero and three. This countvalue is indicative of which pulse in a frame is being received and isprovided (as S0 and S1) to the output data filter 119, hold last statelatch 123, default latch 124, and data selector 129 so that each circuitresponds only to the appropriate pulses of a frame.

The waveforms of FIG. 5 illustrate the signal relationships SIG, CLK,SYNC, LOS, and the On/Off signal for various conditions. For the firstframe (the frames are arbitrarily designated with frame numbers for easeof reference), redundant 25 percent duty cycle pulses are sentcorresponding to "0" or an Off switch state. Clock pulses are producedat 0.5T after each rising edge of a SIG pulse. Following the tworedundant pulses, there is a synchronizing interval or "missing pulse".The missing pulse causes a SYNC pulse to be produced, signifying the endof a frame. Since the two SIG pulses are both of 25 percent duty cycle,the ON/OFF value remains low and the LOS value remains high.

For the second frame, the first SIG pulse is of 25 percent duty cycleand the second is of 75 percent duty cycle. The lack of identity mayresult from noise interference, for example. In such case the CLK andSYNC pulses are again produced as in the first frame and LOS remainshigh. Since the SIG pulses are different, however, the ON/OFF signalretains its previous value, which, in this case is low. In the thirdframe, the SIG pulses are both of 75 percent duty cycle duration,signalling that the ON/OFF switch signal should be raised to the ONlevel. This occurs at the rising edge of the clock pulse following thesecond SIG pulse. For the fourth frame, pulse identity is lost betweenthe control pulses and so the on/off line remains high. The fifth framereturns the on/off line to a low level with the occurrence of redundantpulses both having 25 percent duty cycles. The sixth frame of SIG pulsesincludes four 75 percent duty cycle pulses. The sixth frame is somewhatextended in time duration to accommodate the four pulses and the"missing pulse". The first and second SIG pulses return the ON/OFFsignal to high. Although not shown, the third pulse of the frame causesHLS to go high simultaneously with the rising edge of the resultingclock pulse, and the fourth pulse of the frame causes DEF to go high.

In addition to on/off, default, and hold last state information, thecontrol signal SIG provides timing for returning status or diagnosticdata to the microcontroller. State encoder 125 accepts, as inputs, sixswitch states on conductor bus 115 from the control and sensing section113, along with the ON/OFF, DEF, and HLS bits. The state encoder 125combines these input signals to form a four-bit encoded status messagewhich is provided to state latch 127. Data selector 129 is a one-of-fourselector which accepts the four bits of data from the state latch 127and then sequentially sends this four bit state information to themicrocontroller via the M line. The output of the two-bit counter 121indicates the count of the SIG pulses and controls the data selector 129such that it sends out one bit for each SIG pulse received. The fourbits are coded so that the first bit (X0) indicates whether or not afault condition exists and the second bit (X1) indicates whether or notvoltage appears on the output load. If a fault occurs (X0=0). the thirdand fourth bits (X2 and X3) indicate the nature of the fault. If nofault has occurred (X0=1). then the third bit is indicative of the holdlast state value and the fourth bit is indicative of the default value.

The microcontroller 90 (FIG. 3) determines how much information is to bereceived from the communications section 111 by the number of pulses perframe contained in the control signal, SIG, which is sent to thecommunications section 111. The microcontroller reads the state signalon line M immediately after it puts a rising edge of SIG on the D line.Thus, the number of pulses per frame in the control signal and thenumber of status bits read back per frame are the same. Normally, themicrocontroller puts out two pulses per frame and reads back X0 and X1.If X0 indicates a fault, the microcontroller then shifts to four pulsesper frame so that it can read a fault message contained in the X2 and X3bits. In the absence of a fault, the four-pulse mode may also be used toread and write to the HLS latch 123 and the default latch 124. In suchcase, the third and fourth pulses of SIG either set or reset the HLS anddefault latches, 123 and 124 respectively, and X2 and X3 of the statesignal indicates the status of these two latches.

The control and sensing section 113 of FIG. 4 includes switch logiccircuitry 133, comparator circuitry 135, and a gate drive circuit 137.The switch logic circuitry 133 receives the ON/OFF signal produced bythe communications section 111 and, depending on the status of otherinput signals, provides a corresponding gate signal, via the gate drivecircuit 137, to the gate terminal of a power switching device. The powerswitching device is preferably an insulated gate transistor which willbe more fully discussed hereinbelow.

Among the other signals provided to switch logic circuit 133 are signalsrepresentative of the power supply voltage level and the temperature ofthe power switching device. Signals representing line and load voltageand load current are provided as inputs to the comparator circuit 135.The comparator circuitry 135 develops a set of signals which indicatesthe level of load current with respect to a pre-selected low limit, anintermediate limit, and a high limit. The comparator circuitry 135 alsoprovides a signal indicative of the level of load voltage with respectto the line voltage level, and, for ac, a signal indicative of the aczero crossing. All of these signals are provided as inputs to the switchlogic circuit 133 via a five conductor bus 136. An additional input toswitch logic circuit 133, denominated ac/dc, is provided forpre-selecting operation in either the ac mode or the dc mode.

The switch logic circuit 133 provides the set of diagnostic signalssupplied to state encoder 125 via the six conductor bus 115. This set ofdiagnostic signals is derived from the voltage and current level signalsprovided by comparator circuitry 135 and from the temperature and supplyvoltage signals. The six diagnostic signals may be used, for example, toindicate: 1) that there is an open or disconnected load; 2) that load isin excess of a first high limit value requiring an immediate protectiveresponse; 3) a load current in excess of a second high limit valuerequiring a protective response only if the current remains above thelimit for some pre-selected time period; 4) that load voltage has, orhas not, been applied; 5) the relative level of the supply voltage; and6) the relative temperature of the power switching device.

Various input/output switching circuits may be provided to be controlledby the gate signal emanating from the control and sensing section 113.For example, switching means comprising field effect transistors orsilicon controlled rectifiers (SCRs) may be used as the input/outputswitching circuits. A preferred switching circuit will, in any case,include a shunt current path including means for providing a signalindicative of the current to a connected load. The switching circuitsmost preferred, however, make use of an insulated gate transistor, orIGT.

The IGT, in general, is a power semiconductor device which may be gatedboth into and out of conduction. That is, the IGT may be both turned onand turned off through its gate terminal. Some versions of the IGTinclude a current emulation section which is a section of the IGTprovided to carry a proportional fraction of the total IGT current. Theemulation section is advantageous in that it can be used to monitor thetotal current without resort to large power dissipating shunt resistorsfor current sensing. A single gate signal controls current flow both inthe main section of an IGT and in its emulation section. The insulatedgate transistor is described (albeit under a different name) in anarticle by B. J. Baliga et al., entitled "The Insulated Gate Rectifier(IGR): A New power Switching Device", IEDM 82 (December 1982), pages264-267. An IGT having an emulation section is the subject of a U.S.patent application, Ser. No. 529,240, of common assignee with thepresent invention, the disclosure of which is incorporated herein byreference. FIGS. 7A-7C show various input/ output switching circuitsusing IGTs which may be used in used in the I/O system disclosed herein.

In the dc source circuit of FIG. 7A, the gate signal is applied to thegate terminal 140 of a P-channel IGT 141 having an emitter 142 for amain current section and an emitter 143 for an emulation currentsection. The positive side of the dc power source is connected directlyto the the main emitter 142, and, through burden resistor 145, to theemitter 143 of the emulation section. The collector of the IGT device isconnected externally to one end of the parallel combination of afree-wheeling diode 147 and and pre-load resistor 148. The opposing endof the combination of diode 147 and pre-load resistor 148 is returned tothe negative side of the dc power source. The junction of IGT 141 andthe diode-preload resistor combination provides the IN/OUT terminal 149.Although, in actual use, both an input device and a load would not beconnected at the same time, a load 150 is shown between IN/OUT terminal149 and the load (i.e., output) return terminal 152, and an input device153 is shown between the IN/OUT terminal 149 and the input returnterminal 155. Return terminals 155 and 152 are electrically common,respectively, with the positive and negative lines of of the dc powersource. Pre-load resistor 148 is relatively high in ohmic value andburden resistor 145 is of relatively low ohmic value as are thecorresponding pre-load and burden resistors used in the circuits ofFIGS. 7B and 7C. For example, for a 120 volt source, pre-load resistor148 may be on the order of 20K ohms and burden resistor 145 may be onthe order of ten ohms.

When the circuit of FIG. 7A is operated as an output, load current iscontrolled by turning the IGT 141 on and off at appropriate times. Loadcurrent passes from the power source, through the IGT 141 and the load150, and back to the source. Load current monitoring is facilitated bythe IGT emulation section which provides a load current indicativesignal at the junction between burden resistor 145 and emitter 143. Aload voltage signal, confirming that load voltage is indeed applied, istaken from the junction of the pre-load resistor 148 and the collectorof IGT 141. A line voltage signal is taken from the opposite end of thepre-load resistor 148. The free-wheeling diode 147 is provided as ashunt for reverse currents from inductive loads.

When the circuit of FIG. 7A is operated as an input, the IGT is held inan off state. The state of input device 153 (open or closed) is thendetected by monitoring the voltage developed across the pre-loadresistor 148. This status signal is monitored via the load voltage line.

The dc sink input/output circuitry of FIG. 7B contains the sameoperative elements as does the source circuitry of FIG. 7A, but in asomewhat different configuration. When this circuitry is operated as anoutput, the load 157 is connected between the IN/OUT terminal 158 andthe load return terminal 159. The IGT 161 is switched on or off tocontrol the load current. Notable, however, is the fact that IGT 161 isan N-channel IGT. The collector terminal is connected to one end of theparallel combination of a free-wheeling diode 165 and pre-load resistor167. This combination is in parallel with the terminals 159 and 158 towhich the load 157 is connected. A burden resistor 168 is seriallyconnected between the emulation section emitter and the negative side ofthe dc power source. The main section emitter is tied directly to thenegative side of the dc power source. An IGT current signal, indicativeof load current, is taken from the junction of the burden resistor 168and the emulation section emitter 163. The load voltage signal is takenfrom the IN/OUT terminal 158 and the line voltage signal is taken fromthe positive side of the dc power source which is also connected toinput return terminal 160. As with the dc source circuitry, discussedabove, when the input/output circuitry is used as an input, the IGT 161is held off and the state of the input device 170 is sensed by thevoltage developed across the pre-load resistor 167. This status signalis transmitted via the load voltage line.

In FIG. 7C, illustrating an ac input/output circuit, parallel P and Nchannel IGTs, 175 and 176 respectively, are used. The IGT gate signal isapplied to a gate control circuit 178 which provides two simultaneousgate control signals (of opposite polarity) for controlling (i.e.,turning on and off) IGTs 175 and 176. The emulation section of IGT 175is provided with series connected burden resistor 180 and the emulatingsection of IGT 176 is provided with series connected burden resistor181. An IGT current signal, indicative of the load current in the IGTs,is provided by comparing the signals developed across the two burdenresistors 180 and 181 in differential comparator 183. A transientvoltage suppressor 185 is connected in parallel with the main section ofthe IGTs and between the IN/OUT terminal 186 and the input device devicereturn terminal 187. The return terminal 187 is also electrically commonwith one side of the ac line. A pre-load resistor 189 is connectedbetween the IN/OUT terminal 186 and the load return terminal 190. Thislatter terminal, 190 is connected to the other side of the ac line.

When the circuitry of FIG. 7C is operative as an output, gate control178, in response to an IGT gate signal, commands the IGTs 175 and 176 tosimultaneously be either on or off, thereby switching the load currenton or off. The load 191 is connected between the IN/OUT terminal 186 andthe load return terminal 190. When operated as an input, load 191 is notconnected, and an input switching device 192 is connected between theIN/OUT terminal 186 and the return terminal 187. The IGTs 175 and 176are held in the off state and the state (i.e., the status) of the inputswitching device 192 is determined by the presence or absence of voltageon the load voltage line; the presence of voltage indicating a closedinput switch.

Referring to FIG. 8, showing the control and sensing section in greaterdetail, the ON/OFF signal from the communications section is applied toone input of NAND gate 195, to inverter 196, and to the reset inputs offlip-flops 198 and 199. The other input of NAND gate 195 receives theoutput signal of NAND gate 201. The first input of NAND gate 201 issupplied with a signal which is either high or low, depending on whetherthe output circuit is to be operated as an ac output or as a dc output.It will be recognized that this signal may be provided by a switch orwiring jumper appropriately connecting the ac/dc select line to a highor low reference value. The remaining input of NAND gate 201 receives asignal from zero crossing detector 202, through inverter 201a, toindicate those instances in which the ac line voltage (for ac outputcircuits) is within a certain range of zero voltage. Thus, in the caseof an ac output, NAND gate 195 passes the ON/OFF signal only during azero crossing of the ac line voltage. Zero crossing detector 202 may beany one of a number of conventional circuits providing a signalindicating that the ac input signal is within some range of a zerocrossing. For a dc output, the state of NAND gate 201 allows the ON/OFFsignal to be passed by NAND gate 195. The ON/OFF signal from NAND gate195 is applied to the set input of flip-flop 203. The Q output offlip-flop 203 is applied as one of the three inputs to AND gate 205, theoutput of which serves as the IGT gate signal.

The remaining two inputs to AND gate 205 are supplied by the Q outputsof flip-flops 198 and 199. Flip-flops 198 and 199 are both reset whenthe ON/OFF signal goes to the off state. Flip-flop 198 receives a setsignal from comparator 207 whenever the IGT current exceeds apre-selected value. Thus, a signal indicative of IGT current is appliedto the inverting input of comparator 207 while a reference voltagerepresenting an excessive level of IGT current is applied to itsnon-inverting input. For example, the reference voltage may have a valuecorresponding to 30 amps of current. Similarly, flip-flop 199 receives asignal on its set terminal from power supply monitor 209. Power supplymonitor 209 may be any one of a number of well-known means providing asignal indicative of whether the dc power supply voltage is above orbelow some pre-selected value. Operatively, therefore, a low supplyvoltage or an excessively high IGT current will inhibit AND gate 205.This forces the IGT (which is connected to the output of AND 205) to anoff state in which it remains until the fault condition is cleared.

The Q output of flip-flop 198 is provided for use as an overcurrentshutdown signal and is one of the six switch state signals provided toconductor bus 115 (FIG. 4). The Q output of flip-flop 199, in additionto going to AND gate 205, is also applied as one input to logic gate210. The signal from power supply monitor 209 is applied to theremaining input of logic gate 210 so that its output signal isindicative of the status of the dc power supply. This output signal isalso one of the six switch state signals.

Flip-flop 203 receives a reset signal from the output of NAND gate 212.Of the two inputs to NAND gate 212, the first is the inverted ON/OFFsignal from inverter 196 and the second input is from NAND gate 213. Theac/dc selection signal is provided to one input of NAND gate 213 and theoutput of comparator 214, through inverter 201b, is provided to theother input. Comparator 214 is a monitor comparator for IGT current andhas the IGT current signal applied to its inverting input. A referencevoltage corresponding to a relatively low, minimal IGT current value(e.g., 0.05 amps) is applied to the non-inverting input of comparator214. This combination, comprising NAND gate 212, inverter 196, NAND gate213, and comparator 214, is operative through flip-flop 203 to preventthe IGT from being switched (in an ac mode of operation) unless the IGTload current is less than the reference value.

The IGT current signal is also applied to the non-inverting input ofcomparator 215 wherein it is compared with an intermediate referencecurrent value. The intermediate reference current value (e.g.,corresponding to two amperes) is applied to the inverting input ofcomparator 215. However, also connected to the non-inverting input ofcomparator 215 is a time delay network comprising resistor 216 andcapacitor 220. The combination of resistor 216 and capacitor 220 causesthe voltage at the non-inverting input of comparator 215 to be delayedwith respect to the IGT current. Thus, only if the IGT current exceedsthe reference value for an extended period of time will the output ofcomparator 215 be affected. If the overcurrent is merely of shortduration, then no change of state of comparator 215 occurs. Both theoutput of comparator 215 and the output of comparator 214 are providedas switch state signals. These signals serve as diagnostic signals andindicate, respectively, whether the IGT current is above or below theintermediate reference value and whether it is above or below the lowreference value so that corrective action can be initiated by themicrocontroller if necessary.

In case the IGT current exceeds the intermediate reference value,corrective action is taken only if the overcurrent is of sufficientmagnitude and time duration to trip comparator 215. That is, the loadcurrent may exceed the intermediate reference value for some time beforecorrective action is taken. It is preferable, in some instances, toeliminate the time delay network (i.e., resistor 216 and capacitor 220)and carry out the time delay function by software routines implementedin the microcontroller. Comparison of the IGT, or load current, with thelow, or minimal value, reference allows the generation of a diagnosticsignal (e.g., 0.05A) that is indicative of whether a load is connected,or if connected, whether it is open. The Q output of flip-flop 217 is adiagnostic switch state signal indicative of whether or not voltage ispresent at the connected load. The set input terminal of flip-flop 217is connected to the output of NAND gate 218. NAND 218 receives theinverted ac zero crossing signal from inverter 219 on its first inputterminal and receives the output of comparator 221 on its remaininginput terminal. Comparator 221 compares the line and load voltages toprovide a logic signal which indicates whether the load voltage isgreater or less than a pre-selected percentage of the line voltage. Forexample, the output signal may be indicative of whether the load voltageis greater or less than 70 percent of the line voltage. The line andload voltages are applied, respectively, through input resistors 223 and224 to the input terminals of comparator 221. Functionally, NAND gate218 prevents a change of state of the output of flip-flop 217 wheneverthe ac line voltage is within a certain range of zero volts. In effect,therefore, decisions regarding the status of the load voltage are notmade whenever the ac line voltage is near a zero crossing.

Flip-flop 217 is reset by the output from NAND gate 226. The first inputof NAND gate 226 is provided with the inverted zero crossing signal frominverter 219 and the second input is provided wit the output from thecomparator 221 after it is inverted by inverter 227.

The remaining switch state signal is provided by temperature monitor 229and is indicative of the relative temperature of the IGT (or IGTs in thecase of an ac output) switching device. The temperature monitor 229 ispreferably a simple P-N junction temperature detector 229 which is ingood thermal communication with the IGT. The temperature detector 229may be selected, for example, to provide an indication that the IGTtemperature has exceeded 150° C.

FIG. 9, comprising FIGS. 9A-9C, illustrates an embodiment of thecommunications section (111 of FIG. in greater detail. The outputsignals from timer 117 are derived from an RC timing network comprisedof resistor 300 and timing capacitor 301. Resistor 300 and capacitor 301are connected in series between a positive voltage source +V and acommon circuit point. The junction between the resistor 300 andcapacitor 301 is connected to the inverting input of LOS comparator 303and to the non-inverting inputs of SYNC and CLOCK comparators, 304 and305, respectively. Resistors 308-312 comprise a voltage divider networkin which the resistors are serially connected between +V and the commoncircuit point. Each junction between the resistors 308-312 of thedivider network thus provides a voltage reference. The highest referencevoltage, taken from the junction between resistors 308 and 309, isapplied to the non-inverting input of comparator 303. The other voltagereference values, in descending order of voltage level, arecorrespondingly applied to the inverting inputs of sync comparator 304and clock comparator 305, and to the non-inverting input of controlcomparator 314.

The collector terminal of transistor 315 is connected through collectorresistor 316 to timing comparator 301, the other end of which isconnected to the emitter of transistor 315. The on-off state oftransistor 315 controls the charge-discharge cycle of capacitor 301 andis itself, in turn, controlled by the Q output from flip-flop 317. Aresistor 318 is connected between the base terminal of transistor 315and the Q output of flip-flop 317. The reset terminal of flip-flop 317receives the output signal from control comparator 314. Controlcomparator 314 continuously compares the voltage across the timingcapacitor 301 (applied to the inverting input of comparator 314) withthe reference voltage from the junction of resistors 311 and 312.

In considering operation of timer 117, it may be assumed initially thatthe Q output of flip-flop 317 is at a low level, holding transistor 315off so that capacitor 301 is charged to some level of voltage such thatthe output of control comparator 314 is low. Under these conditions, arising edge of a pulse applied to the clock input of flip-flop 317through buffer amplifier 320 causes a high level to appear at the Qoutput. This turns transistor 315 on, discharging timing capacitor 301.With the discharge of capacitor 301, the CLK signal output of comparator305 is forced to a low level. The output of comparator 304, if notalready low, is also forced to low and the output of LOS comparator 303is forced high if it is not already in that state.

The discharge of capacitor 301 is detected by comparator 314 whoseoutput goes high, resetting flip-flop 317. The Q output of flip-flop 317then goes low, turning transistor 315 off, thus allowing the capacitor301 to begin recharging. Once the recharged voltage is sufficientlyhigh, the clock comparator 305 is triggered, producing a high level CLKsignal. If capacitor 301 is allowed to continue to charge, some voltagelevel will be reached which will trigger, first the SYNC comparator 304,and then the LOS comparator 303. The SYNC comparator 304 is thustriggered by a "missing pulse" and the LOS comparator is triggered by aloss of SIG lasting for approximately 2.5 T as has been described.

In FIG. 9B the SIG and CLK signals are applied to output data filter 119which includes flip-flops 325 and 326, exclusive NOR gate 329, NAND gate328, inverter 330, and transmission gates 331 and 332. The SIG and CLKpulses are applied, respectively, to the D and C inputs of flip-flop 325which operates to retain, at its Q output, the high or low state of theimmediately previous SIG pulse so that the values of the first twopulses of a frame are compared. When the clock pulse appears, the SIGvalue is either high or low depending on whether the pulse value is 75percent or 25 percent duty cycle. For a 25 percent duty cycle pulse, theQ output of flip-flop 325 is forced low; for a 75 percent duty cyclepulse, the Q output is high. Thus, there is in effect a sampling of theSIG value at each occurrence of the clock pulse. The Q output value fromflip-flop 325 is applied to one output of exclusive NOR gate 329 and theSIG value is applied to its other input. Thus, the current pulse valueand the previous pulse values are compared in exclusive NOR 329 whoseoutput is at a high level whenever the inputs are the same.

The output from exclusive NOR 329 is applied as one input to NAND gate328 which receives count pulses S0 and S1, respectively, on its othertwo inputs. The values of S0, S0, S1 and S1, taken together, indicatewhich pulse in a frame is being received. Therefore, if the first twopulse values of a frame are the same and if it is the second pulse thatis being received, the output of NAND gate 328 assumes a logical zerovalue. At all other times and under other conditions, the output of NANDgate 328 is a logical one.

A logical zero at the output of NAND gate 328 thus indicates agreementbetween the first two pulses of a frame and a valid condition forupdating the Q output of flip-flop 326. To that end, the output fromNAND gate 328 is applied in parallel to the input of inverter 330 andopposing control terminals of transmission gates 331 and 332. A logicalzero at the output of NAND gate 328 causes transmission gate 332 to beturned off and transmission gate 331 to be turned on passing the controlsignal SIG to the D input of flip-flop 326. The occurrence of a clockpulse then clocks the new value through to the output of flip-flop 326.

On the other hand, if there is a lack of redundancy in the first twopulses of a frame, the output of NAND gate 328 is a logical one, causingtransmission gate 331 to be held off and transmission gate 332 to beheld on. Under these conditions, the output of flip-flop 326 is fed backthrough gate 332 causing flip-flop 326 to hold the previous outputstate. The Q output of flip-flop 326 therefore represents a filteredversion of the on-off signal which is then passed to output selector120.

In addition to the filtered on-off signal, output selector 120 receivesthe LOS signal and the hold last state and complementary defaultsignals, HLS and DEF respectively. The function of output selector 120(which includes NOR gates 335-337 and OR gate 338), is to select adesired value for the output ON/OFF signal in the event of a loss ofcommunications between an I/O point and the microcontroller, i.e., aloss of the control signal SIG. Should such a loss in communicationsoccur, the output selector 120 provides an output ON/OFF signal which iseither the last transmitted value of SIG or a default value, dependingon the signals HLS and DEF supplied as control inputs to the selector120.

The HLS and DEF signals are generated by the hold-last-state latch 123and the default latch 124, respectively. These latches are substantiallyidentical, but respond to different pulses in a control signal frame.The HLS latch 123 includes NAND gate 340, transmission gates 342 and343, inverter 344, and flip-flop 345; the default latch 124 (FIG. 9C)includes NAND gate 348, transmission gates 349 and 350, inverter 352,and flip-flop 353. Since the circuit configuration and operation ofthese two latches is substantially identical, only the HLS latch 123requires any detailed explanation.

The HLS latch 123 responds to the third pulse in a control signal frame(i.e., it responds to high level S0 and S1 pulses from two bit counter121) in a manner that allows the latch output to be updated. The S0 andS1 pulses are applied as inputs to NAND gate 340 whose output controlstransmission gates 342 and 343. The output of NAND gate 340 is appliedto a first set of opposing control terminals of transmission gates 342and 343 and to the inverter 344. The output of the inverter 344 isapplied to a second set of opposing control terminals of transmissiongates 342 and 343. Thus, in operation, transmission gate 343 is turnedon and transmission gate 342 is turned off by the occurrence of a thirdpulse in the control signal frame. Since the control signal is appliedas the input to transmission gate 343, the signal is passed through tothe D input of flip-flop 345, thereby updating the HLS signal which istaken from the Q output of flip-flop 345. The HLS output is also fedback to the input of transmission gate 342 so that, in the absence of athird pulse in a control signal frame, the HLS value remains latched.The clock signal is applied to the CLOCK input of flip-flop 345. Theoutput of the HLS latch 123 is supplied to the output selector 120.

By comparison, the default latch 124 operates in substantially the samemanner but responds to the fourth pulse in a frame. That is, the defaultlatch responds to the S0 and S1 pulses of a control signal frame.Notable, however, is the fact that the output of the default latch 124is taken from the Q output of flip-flop 353 so that the complementarysignal DEF is supplied to the output selector 120.

In normal operations, the output selector 120 functions to simply invertand pass the control signal from flip-flop 326 which signal then becomesthe on-off output signal applied to the control and sensing section 113(FIG. 4). However, upon loss of communications between the I/O point andthe micro controller (i.e., a loss of the control signal SIG), theoutput ON/OFF signal is forced to a predetermined, desired statedetermined by the LOS and HLS signals. These latter signals are bothapplied as inputs to the output selector 120. In the event there is aloss of communications, the output selector 120 either holds the laststate or selects a default state, depending on which has beenpre-selected. The pre-selection is made to force the I/O point to apreferred, safe state should there be a communications loss.

The LOS and HLS signals are inputs to NOR gate 335 whose output is oneinput to NOR gate 337. The second input to NOR gate 337 is the signalfrom the Q output of flip-flop 326. Thus, NOR gate 335 controls NOR gate337 so that if either LOS or HLS are at a high level, NOR gate 337simply inverts the control signal from flip-flop 326. On the other hand,if LOS is low (loss of communications) and HLS is also low, the outputof NOR gate 335 is high, holding the output of NOR gate 337 at a lowlevel.

The LOS, HLS, and DEF signals are applied to NOR gate 336 whose output,along with the output from NOR gate 337, are applied as inputs to ORgate 338. The output of OR gate 338 is the control ON/OFF signal. Thus,with a loss of communications (LOS low) and no command to hold the laststate (HLS low), the output ON/OFF signal from OR gate 338 is selectedto be the default signal, DEF (i.e., DEF becomes inverted by NOR gate336). The operation is such, therefore, that if there is a loss ofcommunications and the hold last state is not selected, a defaultcondition is selected. Whether the last state is held if the defaultcondition is selected is, of course, controllable by appropriatelysetting the HLS latch 123 and the default latch 124.

The foregoing describes the forward path through the control andcommunications section 111 in detail. The return of encoded diagnosticinformation, is, as has been discussed above, through state latch 125and one of four data selection 129. The encoding of the information isdiscussed in detail in connection with FIG. 10; however, at this pointit is sufficient to note that the inputs, X0-X3, to state latch 125 areencoded to contain the diagnostic and other information to be returnedto the microcontroller 90 of FIG. 3. The state latch 125 may be acommercially available device such as the Model MC14174, available fromMotorola Inc. The encoded information, X0-X3, is latched into the statelatch 125 on the rising edge of the SYNC signal which is also suppliedto the state encoder 125. Thus, a new set of data is latched in on eachframe of the control signal. This data forms a diagnostic signalindicative of the operating parameters of the I/O point.

The data from state latch 125 is transmitted bit-by-bit through one offour data selector 129 to the microcontroller 90 through bufferamplifier 360. The data selector 129 responds to the current value from2-bit counter 121 to cause the values of X0-X3 to be fed through inorder. Thus, for example, as the first pulse in a frame is beingreceived, the X0 bit of diagnostic data is simultaneously transmitted.The data selector 129 may be a commercially available device, such asthe Model MC14052 from Motorola, Inc.

FIG. 10 illustrates a truth table for a state encoder such as encoder125 of FIG. 4. An encoder in accordance with the truth table of FIG. 10may readily be implemented with standard combinational logic elements byone of ordinary skill in the art.

Referring to FIG. 10, the input conditions are listed horizontallyacross the top of the left-hand portion of the table. Underneath, incolumnar fashion, are the possible values that each input may take. Inthe table, "ones" indicate that a value is true (e.g., a high levelsignal), "zeroes" indicate that a value is not true, and X's indicate"don't cares" (i.e., may either be one or zero without effect). The4-bit output (X0-X3) of the state encoder 125 is shown in the right-handportion of the table wherein X0-X3 are distributed horizontally acrossfour columns. Each horizontal row across the four columns is thus a4-bit word which uniquely defines the state of the I/O point. This 4-bitword is the diagnostic data which is returned to the microcontroller 90of FIG. 4 and ultimately to the controller CPU (FIG. 1).

For example, in the truth table, the first row shows a high level in thelow voltage column while the remaining columns are indeterminate "don'tcare" conditions. Under these circumstances the 4-bit output is uniquelydetermined to be all zeroes. This all zero 4-bit word signals a loss ofthe I/O point power supply. By further example, row six shows that theoutput is commanded on, but that the output is in a shorted condition.That is, a one appears in column one under ON/OFF indicating that theI/O point is to be turned on, while simultaneously, there is anovercurrent indication in the overcurrent column (col. 6). The 4-bitoutput word for this condition is all zeroes except that X3 is at theone level. Similarly, there is a set of fifteen unique 4-bit words thatdefine the various conditions of the I/O point.

The foregoing describes features of an improved input/output systemhaving utility in connection with programmable controllers. While thebest mode contemplated for carrying out the invention has beendescribed, it is understood that various other modifications may be madetherein by those of ordinary skill in the art without departure from theinventive concepts inherent in the true invention. Accordingly, it isintended by the following claims to claim all modifications which fallwithin the true spirit and scope of the invention.

The invention claimed is:
 1. For use in an input/output (I/O system of aprogrammable controller, a communications method for exchanginginformation on control and operating parameters between a controllingelement of the I/O system and a controlled element thereof whichincludes an output control device activated and deactivated inaccordance with the control information, comprising the steps of:a)generating in the controlling element a control signal in the form ofsequential pulse frames, each frame having at least one control pulsedefining said control information; b) transmitting said control signalto said controlled element and generating in the controlled element aclock pulse for each control pulse such that said clock pulse followssaid control pulse by a pre-selected time interval on each frame, therebeing one clock pulse for each control pulse such that there is a fixedtime relationship between each control pulse and each clock pulse; c)generating in the controlled element a diagnostic signal independent ofthe control signal but which is indicative of operating parameters ofthe controlled element; and d) using said clock pulse on each frame tocause a sampling of said control information and to cause a transmissionof a value of said diagnostic signal to said controlling element.
 2. Themethod of claim 1 wherein each frame of the control signal furtherincludes a no-pulse time interval during which no pulses appear definingthe end of a frame.
 3. The method of claim 2 wherein each frame of saidcontrol signal includes a series of pulses defining said controlinformation.
 4. The method of claim 3 wherein said series of pulses ispulse width modulated.
 5. The method of claim 4 wherein said diagnosticsignal comprises a multi-bit digital signal and the number of bitstransmitted to said controlling element on each frame equals the numberof pulses in said series of pulses in the same frame.
 6. In aninput/output (I/O) system of a programmable controller, an input/outputmode comprisingan operations control unit providing a control signal inthe form of sequential pulse frames, each frame having at least onecontrol pulse defining a desired control status; and at least one I/Opoint connected to the operations control unit and having an outputcontrol device subject to activation and deactivation as an operativecondition in accordance with said control status and further including:(1) timing means responsive to each control pulse to generate a clockpulse which follows said control pulse by a pre-selected time intervalon each frame, there being one clock pulse for each control pulse suchthat there if a fixed time relationship between such pulses; (2) meansconnected to the I/O point providing a diagnostic signal having a valueindicative of the operative condition of the I/O point; (3) meansconnected to receive each clock pulse and responsive to each clock pulseon each frame to cause a sampling of each control pulse to determine thedesired control status; and (4) means connected to receive each clockpulse and the diagnostic signal and responsive to said clock pulse oneach frame to cause a transmission of a value of said diagnostic signalto the operations control unit.
 7. The input/output module of claim 6wherein said operations control unit provides said control signal suchthat each frame includes a series of pulses followed by a no-pulse timeinterval during which no pulses occur, said no-pulse time intervaldefining the end of a frame.
 8. The input/output module of claim 7wherein at least the first two pulses of each frame are pulse widthmodulated redundantly to determine the control status.
 9. In aprogrammable controller input/output system of the type having aplurality of input/output modules, each adapted to be located inproximity to a process being controlled, circuitry for use in suchmodules, comprising:output control means responsive to be activated anddeactivated by a command signal; an operations controller generating atleast one control signal in the form of sequential pulse frames, eachframe of which contains at least one pulse defining a control status forthe output control means and a time interval without pulses defining theend of the frame whenever said interval reaches a first pre-selectedtime duration; a communications and control section receiving saidcontrol signal and including means responsive to said at least one pulseto provide said command signal for activating and deactivating saidoutput control means in accordance with said control status for eachframe and means responsive to said time interval for synchronizingoperation of said communications and control section with each frame;sensing means providing status signals indicative of the operativecondition of said output control means; and wherein said communicationsand control section includes coding means receiving said status signalsand responsive thereto to produce a diagnostic signal which is updatedon each frame of said control signal and first selector means fortransmitting said diagnostic signal to said operations controller oneach frame of said control signal.
 10. The circuitry of claim 9 whereineach frame of said control signal contains a series of pulses definingsaid control status.
 11. The circuitry of claim 10 wherein at least thefirst two pulses of each frame are pulse width modulated redundantly todetermine the command signal for activating and deactivating the outputcontrol means.
 12. The circuitry of claim 11 wherein said communicationsand control section further includes second selector means responsive tosaid time interval to cause said output control means to assume apre-selected state whenever the time duration of said interval reaches asecond pre-selected value.
 13. The circuitry of claim 12 furtherincluding a plurality of output control means and a correspondingplurality of communications and control sections, and wherein saidoperations controller generates a plurality of control signals providingone control signal for each communications and control section.
 14. Foruse in the input/output (I/O) system of a programmable controller, amethod for exchanging control and diagnostic information between acontrolling element of the I/O system and a controlled element thereofwhich includes an output control device activated and deactivated inaccordance with the control information, comprising the steps of:a)generating in the controlling element a train of pulses formingsequential pulse frames, each such frame including a series of pulsesfollowed by a no-pulse time interval during which no pulses appear, theseries of pulses being indicative of binary control information to betransmitted to said controlled element; b) transmitting said pulse trainto said controlled element wherein each pulse of each frame initiatesthe generation of a clock pulse which follows each pulse of each frameby a preselected time interval to cause entry of said binary informationinto latching circuitry defining a controlled status for said controlledelement and each no-pulse time interval initiates a synchronizing signalindicating the end of each frame and resetting the controlled element;c) generating in the controlled element a multi-bit diagnostic signalindicative of operating parameters related to the controlled element; d)transmitting said multi-bit diagnostic signal to said controllingelement in frames simultaneously with each frame of said pulse train.15. The method of claim 14 wherein the multi-bit diagnostic signal isupdated on each frame of said pulse train.